import {getDateDiff, parseStrToDate} from "@/utils/DateUtils";

export function countDown(endTimeStr) {

    const time1 = parseStrToDate(time1Str)

    const time2 = new Date().getTime()
    var times = time1 - time2//时间差的毫秒数

    var days = parseInt(times / (24 * 1000 * 3600));//计算相差的天数
    var leave = times % (24 * 3600 * 1000);//计算天数后剩余的毫秒数

    var h = parseInt(leave / (3600 * 1000));//计算小时数

    //计算分钟数
    var h_leave = leave % (3600 * 1000);
    var min = parseInt(h_leave / (60 * 1000));

    //计算秒数
    var min_leave = h_leave % (60 * 1000);
    var sec = parseInt(min_leave / 1000);

    var timer = setInterval(() => {

    }, 1000);
}
